/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.eddycar.jproyeddycar.contrato.dao;

import java.util.List;
import org.eddycar.jproyeddycar.dao.*;
import org.eddycar.jproyeddycar.contrato.modelo.*;


/**
 *
 * @author Administrador
 */
public class DaoDocumento extends JpaDao<String, DocumentoPrivado> {


    @Override
    public DocumentoPrivado buscarId(String id) {
        return (DocumentoPrivado)getEm().find(DocumentoPrivado.class, id);
    }


    public List<DocumentoPrivado> buscarPorCedula(String cedula) {
        return getEm().createQuery("SELECT c FROM DocumentoPrivado c WHERE c.id like'%"+cedula+"%'").getResultList();
    }

}
